const mongoose = require('./connection')

// 创建schema
const schema = new mongoose.Schema({
    username: {
        type: String,
        required: true
    },
    password: {
        type: String,
        required: true
    },
    email: {
        type: String,
        required: true
    },
    avatar: String
})

// 创建model
module.exports = mongoose.model('user', schema)